MRI-guided linear accelerator